package com.linxi.controller;

import com.linxi.entity.dto.AiPrompt;
import com.linxi.service.AiPromptService;
import com.linxi.utils.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/aiPrompt")
@Slf4j
public class AiPromptController {

    @Autowired
    private AiPromptService aiPromptService;

    @RequestMapping("/hello")
    public String getAiPrompt(){
        return "hello";
    }

    @RequestMapping("/list")
    public AjaxResult listAiPrompt(){
        final List<AiPrompt> list = aiPromptService.list();
        return AjaxResult.success(list);
    }
}
